package com.mz.ozy.mvp.model;

import android.app.Activity;
import android.content.Context;
import android.text.TextUtils;

import com.mz.ozy.bean.LoginBean;
import com.mz.ozy.constants.Constants;
import com.mz.ozy.net.RetrofitUtils;
import com.mz.ozy.utils.JsonUtils;
import com.mz.ozy.utils.MD5Util;

import java.util.HashMap;
import java.util.Map;

import io.reactivex.Observable;
import okhttp3.ResponseBody;

/**
 * Created by administrator on 2018/12/3.
 */
public class SetPassModel {

    /**
     * 账号登录
     *
     * @param context
     * @param invitecode
     * @param password
     * @return
     */
    public Observable<ResponseBody> setPassword(Context context, String invitecode, String password, String repass) {
        Map<String, String> jsonObject = new HashMap<>();
        jsonObject.put("invitecode", invitecode);
        jsonObject.put("pwd", MD5Util.getMD5String(password));
        return RetrofitUtils.getApiService(context).post(Constants.TransCode.TransCode10005, JsonUtils.requestJsonDate(jsonObject), Constants.tokenId);
    }

}
